#!/bin/sh
#
# Takes ical output from Facebook application www.fbCal.com
# and the egrep and sed create the following form:
#
# 19310406
# Ram Dass
# 18420111
# William James
# 19150106
# Alan Watts
# 17230616
# Adam Smith
# 
# and the process_pairs.py script further massages it as:
#
# 04/06/1931\tRam Dass
# 01/11/1842\tWilliam James
# 01/06/1915\tAlan Watts
# 06/16/1723\tAdam Smith
# 

INFILE=fbCal_birthdays.ics

cat $INFILE | \

egrep "DTSTART|SUMMARY" | \
sed "
s,'s Birthday,,
s,DTSTART;VALUE=DATE:,,
s,SUMMARY:,,
" | \

./process_pairs.py |
sort -n
